package com.chee.plant.log;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;

public class PlantLogFormat extends Formatter {

	@Override
	public String format(LogRecord logRecord) {
		Date date=new Date();
		SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		String time = df.format(date);
		return  time + ":" + "\t|\t" + 
		  logRecord.getLevel() + 
		     "\t|\t" +
		  logRecord.getMessage() + 
		      "\t|\n";    
	}

}
